import '../match/match_live_entity.dart';

class LiveDetailEntity {
  String? chatGroupId;
  String? expertId;
  String? expertLogo;
  String? expertName;
  int? hot;
  String? image;
  int? isFocus;
  int? liveId;
  int? matchId;
  String? matchTime;
  String? message;
  String? publishTime;
  int? sportsId;
  int? status;
  String? title;
  String? url;
  int? vtype;
  int? bindMatch;
  int? landscapeScreen;

  LiveDetailEntity(
      {this.chatGroupId,
        this.expertId,
        this.expertLogo,
        this.expertName,
        this.hot,
        this.image,
        this.isFocus,
        this.liveId,
        this.matchId,
        this.matchTime,
        this.message,
        this.publishTime,
        this.sportsId,
        this.status,
        this.title,
        this.url,
        this.vtype,
        this.bindMatch,
        this.landscapeScreen
      });

  LiveDetailEntity.fromJson(Map<String, dynamic> json) {
    chatGroupId = json['chatGroupId'];
    expertId = json['expertId'];
    expertLogo = json['expertLogo'];
    expertName = json['expertName'];
    hot = json['hot'];
    image = json['image'];
    isFocus = json['isFocus'];
    liveId = json['liveId'];
    matchId = json['matchId'];
    matchTime = json['matchTime'];
    message = json['message'];
    publishTime = json['publishTime'];
    sportsId = json['sportsId'];
    status = json['status'];
    title = json['title'];
    url = json['url'];
    vtype = json['vtype'];
    bindMatch = json['bindMatch'];
    landscapeScreen = json['landscapeScreen'];
  }

  LiveDetailEntity.fromMatch(MatchLiveEntity? live,int this.sportsId) {
    liveId = live?.roomId;
    chatGroupId = live?.chatGroupId;
    expertId = live?.expertId;
    matchId = live?.matchId;
    vtype = live?.vtype;
    url = live?.url;
    bindMatch = 1;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['chatGroupId'] = this.chatGroupId;
    data['expertId'] = this.expertId;
    data['expertLogo'] = this.expertLogo;
    data['expertName'] = this.expertName;
    data['hot'] = this.hot;
    data['image'] = this.image;
    data['isFocus'] = this.isFocus;
    data['liveId'] = this.liveId;
    data['matchId'] = this.matchId;
    data['matchTime'] = this.matchTime;
    data['message'] = this.message;
    data['publishTime'] = this.publishTime;
    data['sportsId'] = this.sportsId;
    data['status'] = this.status;
    data['title'] = this.title;
    data['url'] = this.url;
    data['vtype'] = this.vtype;
    data['bindMatch'] = this.bindMatch;
    data['landscapeScreen'] = this.landscapeScreen;
    return data;
  }
}
